package com.katze.boot.common.converter;

import com.alibaba.excel.converters.string.StringStringConverter;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;

public class MenuTypeConverter extends StringStringConverter {

    @Override
    public WriteCellData<?> convertToExcelData(String value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) {
        switch (value){
            case "0":
                return new WriteCellData<>("菜单");
            case "1":
                return new WriteCellData<>("按钮");
            case "2":
                return new WriteCellData<>("应用");
            default:
                return new WriteCellData<>("未知");
        }
    }
}
